public class Entity extends SceneModel {
	boolean aBoolean1541;
	final boolean[] runningFlags;
	public int currentAnimation;
	int anInt1503;
	int anInt1504;
	int runAnimation;
	int idleAnimation;
	int turnAnimation;
	int anInt1513;
	int anInt1517;
	int anInt1518;
	int anInt1519;
	int anInt1520;
	int anInt1521;
	int anInt1522;
	int anInt1523;
	int anInt1524;
	int anInt1527;
	int anInt1528;
	int animationDelay;
	int anInt1530;
	int textEffects;
	int anInt1537;
	int anInt1538;
	int anInt1539;
	int boundingCube;
	int anInt1542;
	int anInt1543;
	int anInt1544;
	int anInt1545;
	int anInt1546;
	int anInt1547;
	int anInt1548;
	int anInt1549;
	int anInt1552;
	int walkAnimation;
	int anInt1555;
	int anInt1556;
	int anInt1557;
	public int currentHealth;
	public int faceX;
	public int faceY;
	public int height;
	final int[] damageValues;
	final int[] damageTypes;
	final int[] damageCycles;
	public final int index = -1;
	public int interactingEntity;
	public int combatCycle;
	public int maxHealth;
	public final int[] walkQueueX;
	int smallXYIndex;
	public final int[] walkQueueY;
	int textCycle;
	public String textSpoken;
	public int turnDirection;
	public int x;
	public int y;

	public boolean isVisible() {
		return false;
	}

	public final void method446() {
		smallXYIndex = 0;
		anInt1542 = 0;
	}

	public final void moveInDir(boolean flag, int i) {
		int j = walkQueueX[0];
		int k = walkQueueY[0];
		if (i == 0) {
			j--;
			k++;
		}
		if (i == 1) {
			k++;
		}
		if (i == 2) {
			j++;
			k++;
		}
		if (i == 3) {
			j--;
		}
		if (i == 4) {
			j++;
		}
		if (i == 5) {
			j--;
			k--;
		}
		if (i == 6) {
			k--;
		}
		if (i == 7) {
			j++;
			k--;
		}
		if ((currentAnimation != -1) && (Animation.animations[currentAnimation].walkType == 1)) {
			currentAnimation = -1;
		}
		if (smallXYIndex < 9) {
			smallXYIndex++;
		}
		for (int l = smallXYIndex; l > 0; l--) {
			walkQueueX[l] = walkQueueX[l - 1];
			walkQueueY[l] = walkQueueY[l - 1];
			runningFlags[l] = runningFlags[l - 1];
		}
		walkQueueX[0] = j;
		walkQueueY[0] = k;
		runningFlags[0] = flag;
	}

	public final void setPos(int i, int j, boolean flag) {
		if ((currentAnimation != -1) && (Animation.animations[currentAnimation].walkType == 1)) {
			currentAnimation = -1;
		}
		if (!flag) {
			int k = i - walkQueueX[0];
			int l = j - walkQueueY[0];
			if ((k >= -8) && (k <= 8) && (l >= -8) && (l <= 8)) {
				if (smallXYIndex < 9) {
					smallXYIndex++;
				}
				for (int i1 = smallXYIndex; i1 > 0; i1--) {
					walkQueueX[i1] = walkQueueX[i1 - 1];
					walkQueueY[i1] = walkQueueY[i1 - 1];
					runningFlags[i1] = runningFlags[i1 - 1];
				}
				walkQueueX[0] = i;
				walkQueueY[0] = j;
				runningFlags[0] = false;
				return;
			}
		}
		smallXYIndex = 0;
		anInt1542 = 0;
		anInt1503 = 0;
		walkQueueX[0] = i;
		walkQueueY[0] = j;
		x = walkQueueX[0] * 128 + boundingCube * 64;
		y = walkQueueY[0] * 128 + boundingCube * 64;
	}

	public final void updateHitData(int j, int k, int l) {
		for (int i1 = 0; i1 < 4; i1++) {
			if (damageCycles[i1] <= l) {
				damageValues[i1] = k;
				damageTypes[i1] = j;
				damageCycles[i1] = l + 70;
				return;
			}
		}
	}

	Entity() {
		walkQueueX = new int[10];
		walkQueueY = new int[10];
		interactingEntity = -1;
		anInt1504 = 32;
		runAnimation = -1;
		height = 200;
		idleAnimation = -1;
		turnAnimation = -1;
		damageValues = new int[4];
		damageTypes = new int[4];
		damageCycles = new int[4];
		anInt1517 = -1;
		anInt1520 = -1;
		currentAnimation = -1;
		combatCycle = -1000;
		textCycle = 100;
		boundingCube = 1;
		aBoolean1541 = false;
		runningFlags = new boolean[10];
		walkAnimation = -1;
		anInt1555 = -1;
		anInt1556 = -1;
		anInt1557 = -1;
	}
}
